<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>Document</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            .box{
                /*display: -webkit-flex;
                display: -moz-flex;
                display: -ms-flex;
                display: -o-flex;*/
                display: flex;
                flex-flow: row nowrap;
            }
            .item,.item-item{
                flex:1;
                background-color: #fc0;
            }
            .item-box{
                height: 100px;
                width: 400px;
                color:#fff;
                background-color: #f00;
            }
            .item-item{
                background-color: #0fc;
            }
            .item-item-box{
                width: 200px;
                height: 100%;
                background-color: #c0f;
            }
            .df{
                /*display: -webkit-flex;
                display: -moz-flex;
                display: -ms-flex;
                display: -o-flex;*/
                display: flex;
            }
        </style>
    </head>
    <body>
        <h2>1.不设置display:flex的子元素为display:flex</h2>
        <div class="box">
            <div class="item-box">
                <div class="item-item-box">项目子项目</div>
                <div class="item-item">项目子项目</div>
            </div>
            <div class="item">项目</div>
        </div>
        <h2>2.设置display:flex的子元素为display:flex</h2>
        <div class="box">
            <div class="item-box df">
                <div class="item-item-box">项目子项目</div>
                <div class="item-item">项目子项目</div>
            </div>
            <div class="item">项目</div>
        </div>
    </body>
</html>